Bites of Lists - Mapping and Filtering Sublists
نویسنده
چکیده
The idea of applying map and filter functions on consecutive sublists instead of on individual list elements is discussed and developed in this paper. A non-empty, consecutive sublist is called a bite. Both map and filter functions accept a function parameter a bite function which is responsible for returning a prefix bite of a list. We develop families of bite functions via a collection of higher-order bite generators. On top of the bite generators, a number of bite mapping and bite filtering functions are introduced. We illustrate the usefulness of bite mapping and filtering via examples drawn from a functional programming library that processes music, represented as Standard MIDI Files.
منابع مشابه
Dynamic Sublists: Scaling Unmoderated Mailing Lists
Unmoderated electronic mailing lists suffer from the paradox that the more successful they are, the more difficult they are to use and administer because of the increasing number of users and discussions. Traditional solutions to this problem, such as creating static sublists or providing a Web interface, are not always desirable. We discuss the problems with traditional solutions and present d...
متن کاملApplication of Mixture Tuned Matched Filtering on ASTER Data for Hydrothermal Alteration Mapping Related to Porphyry Cu Deposits in Jabal-Barez Ranges, Kerman Copper Belt, Iran
The study area is located in Jabal-Barez Ranges, southeastern part of Kerman Copper Belt (KCB), where the porphyry copper mineralization such as Kerver occurs. This article deals with the enhancement of hydrothermal alteration minerals for exploration of porphyry Cu mineralization, and differentiates intense hydrothermal alteration zones from those with low intensity. Shortwave Infrared (SWIR) ...
متن کاملk-way merging and k-ary sorts
We present a divide-and-conquer algorithm for merging k sorted lists, namely, recursively merge the first lists, do likewise for the last lists, then merge the two results. We get a tight bound for the expense, in comparisons made between list elements, of this merge. We show the algorithm is cheapest among all similar divide-and-conquer approaches to k-way merging. We compute the expense of th...
متن کاملPolynomial-Time Query Languages for Untyped Lists
We present a language for querying list-based complex objects. These objects are constructible with untyped nodes and hence permit arbitrary-depth sublists. The language is shown to express precisely the polynomial-time generic functions. The language controls complexity by carefully restricting the replication of values and limiting the form and nesting of recursion.
متن کاملReasoning about Lists via List Interleaving
Among the various mathematical tools introduced in his outstanding work on Communicating Sequential Processes, Hoare has defined ”interleaves” as the predicate satisfied by any three lists such that the first list may be split into sublists alternately extracted from the other two ones, whatever is the criterion for extracting an item from either one list or the other in each step. This paper e...
متن کامل